

window.onload=function () {


    //下载

    document.getElementById("download").addEventListener("click",()=>{



        window.location="/downloadzip";

    });
    //总览
    document.getElementById("view").addEventListener("click",()=>{

        window.location="/search";

    });

    //管理
    document.getElementById("adm").addEventListener("click",()=>{

        window.location="/adm";

    });

    document.getElementById("out").addEventListener("click",()=>{

        let xh4=null;
        if (XMLHttpRequest) {
            xhr = new XMLHttpRequest();
        }
        let url="/out";
        xhr.open("GET",url,true);
        xhr.send();
        xhr.onload=function () {

            var tgd = JSON.parse(xhr.responseText).status;
           if(tgd=="OK"){

               window.location="/";
           }
        }
    });




}